<!--代码逻辑和样式库-->
<script src="./create-menu.component.js"></script>
<style src="./create-menu.scss" scoped lang="scss"></style>

<template>
  <div>
    <el-dialog :title="title" :visible.sync="showDialog" width="40%" @close="closeDialog()">
      <el-form ref="dataForm" :rules="editRules" :model="editForm" label-position="left" label-width="110px">
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item prop="name" label="菜单名称:">
              <el-input v-model="editForm.name" />
            </el-form-item>
            <el-form-item prop="code" label="菜单编码:">
              <el-input v-model="editForm.code" />
            </el-form-item>
            <el-form-item prop="pname" label="上级菜单">
              <el-input v-model="editForm.pname" disabled />
            </el-form-item>
            <el-form-item label="菜单路径:">
              <el-input v-model="editForm.path" />
            </el-form-item>
            <el-form-item label="菜单图标:">
              <el-input v-model="editForm.icon" />
            </el-form-item>
            <el-form-item label="排序号:">
              <el-input v-model="editForm.sort" />
            </el-form-item>
            <el-form-item label="菜单说明:">
              <el-input v-model="editForm.remark" />
            </el-form-item>
            <el-form-item label="是否展示:">
              <el-radio-group v-model="editForm.isShow">
                <el-radio :label="1">是</el-radio>
                <el-radio :label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="是否权限控制:">
              <el-radio-group v-model="editForm.isAuthenticate">
                <el-radio :label="1">是</el-radio>
                <el-radio :label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" :loading="loading" @click="save()">保存</el-button>
        <el-button @click="showDialog = false">关闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>
